package cn.com.cifi.mars.common.enums;

/**
 * @author plx
 */
public enum RemovalReportGroupCodeEnum {
    /**
     * 全盘动态-总货值
     */
    DYNAMIC_TOTAL_PRICE("dynamic_total_price","全盘动态-总货值"),
    DYNAMIC_SALE_PRICE("dynamic_sale_price","全盘动态-已售货值"),
    DYNAMIC_STOCK_PRICE("dynamic_stock_price","全盘动态-存货货值"),
    DYNAMIC_PLAN_PRICE("dynamic_plan_price","全盘动态-规划货值"),
    DYNAMIC_REAL_PRICE("dynamic_real_price","全盘动态-实际货值"),
    DYNAMIC_RIGHT_PRICE("dynamic_right_price","全盘动态-权益货值"),

    BEFORE_REAL_SUPPLY("before_real_supply","去年及以前-实际供货"),
    BEFORE_REAL_SIGN("before_real_sign","去年及以前-实际签约"),
    BEFORE_REMOVAL("before_removal","去年及以前-去化率"),

    /**
     * yyyy会替换成年，mm会替换成月
     */
    DATERANGE_REAL_SUPPLY_YYYY_MM("daterange_real_supply_yyyy_mm","实际供货_年_月"),
    DATERANGE_REAL_SIGN_YYYY_MM("daterange_real_sign_yyyy_mm","实际签约_年_月"),
    DATERANGE_REMOVAL_YYYY_MM("daterange_removal_yyyy_mm","去化率_年_月"),

    DATERANGE_REAL_SUPPLY_SUM("daterange_real_supply_sum","时间范围合计-实际供货"),
    DATERANGE_REAL_SUPPLY_EXP_SUM("daterange_real_supply_exp_sum","时间范围合计-实际供货-不含未推售阶段自持存货"),
    DATERANGE_REAL_SIGN_SUM("daterange_real_sign_sum","时间范围合计-实际签约"),
    DATERANGE_REAL_SIGN_EXP_SUM("daterange_real_sign_exp_sum","时间范围合计-实际签约-不含未推售阶段自持存货"),
    DATERANGE_REMOVAL_SUM("daterange_removal_sum","时间范围合计-去化率"),
    DATERANGE_REMOVAL_EXP_SUM("daterange_removal_exp_sum","时间范围合计-去化率-不含未推售阶段自持存货"),

    OVERALL_REAL_SUPPLY("overall_real_supply","整盘-实际供货"),
    OVERALL_REAL_SIGN("overall_real_sign","整盘-实际签约"),
    OVERALL_REMOVAL("overall_removal","整盘-去化率"),


    ;

    private String code;

    private String name;

    RemovalReportGroupCodeEnum(String code, String name) {
        this.code = code;
        this.name = name;
    }

    public String getCode() {
        return code;
    }

    public String getName() {
        return name;
    }

    public String toFormatString(String ele){
            return code.concat("=>").concat(ele);
    }

    public String toDateFormatString(String date,String ele){
            return code.replace("yyyy_mm",date).concat("=>").concat(ele);
    }
}
